package com.example.danangtravel;

import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.ImageSpan;
import android.text.util.Linkify;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.TextView;

public class huongdan_activity extends Activity {
	ImageButton huongdan;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.huongdan_activity);
		huongdan = (ImageButton) findViewById(R.id.btn_huongdan);
		huongdan.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				// TODO Auto-generated method stub
				finish();
			}
		});
		TextView text_backhotel = (TextView) findViewById(R.id.text_backhotel);
		SpannableString back = new SpannableString(getText(R.string.quaylai));
		Drawable dr_back = getResources().getDrawable(R.drawable.hd_home);
		dr_back.setBounds(0, 0, dr_back.getIntrinsicWidth(),
				dr_back.getIntrinsicHeight());
		ImageSpan span_back = new ImageSpan(dr_back, ImageSpan.ALIGN_BASELINE);
		back.setSpan(span_back, 11, 12, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
		text_backhotel.setText(back);

		TextView tv_maphotel = (TextView) findViewById(R.id.text_maphotel);
		SpannableString map_hotel = new SpannableString(getText(R.string.map));
		Drawable dr_map = getResources().getDrawable(R.drawable.hd_map);
		dr_map.setBounds(0, 0, dr_map.getIntrinsicWidth(),
				dr_map.getIntrinsicHeight());
		ImageSpan span_map = new ImageSpan(dr_map, ImageSpan.ALIGN_BASELINE);
		map_hotel.setSpan(span_map, 11, 12, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
		tv_maphotel.setText(map_hotel);

		TextView tvhd_ks = (TextView) findViewById(R.id.tvhd_khachsan);
		tvhd_ks.setText("1. Thông tin về khách sạn, resort Đà Nẵng.");

		TextView text_ks = (TextView) findViewById(R.id.text_khachsan);
		SpannableString ks = new SpannableString(getText(R.string.khachsan));
		Drawable dr = getResources().getDrawable(R.drawable.hd_hotel);
		dr.setBounds(0, 0, dr.getIntrinsicWidth(), dr.getIntrinsicHeight());
		ImageSpan span = new ImageSpan(dr, ImageSpan.ALIGN_BASELINE);
		ks.setSpan(span, 11, 12, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
		text_ks.setText(ks);

		TextView text_tabhtel = (TextView) findViewById(R.id.text_tabhotel);
		text_tabhtel.setText(getText(R.string.tab_hotel));

		TextView text_tabresort = (TextView) findViewById(R.id.text_resort);
		text_tabresort.setText(getText(R.string.tab_resort));

		TextView tvhd_dulich = (TextView) findViewById(R.id.tvhd_dulich);
		tvhd_dulich.setText("2. Thông tin địa điểm du lịch ở Đà Nẵng.");

		TextView text_dl = (TextView) findViewById(R.id.text_dulich);
		SpannableString du = new SpannableString(getText(R.string.dulich));
		Drawable dr_du = getResources().getDrawable(R.drawable.hd_travelpoint);
		dr_du.setBounds(0, 0, dr_du.getIntrinsicWidth(),
				dr_du.getIntrinsicHeight());
		ImageSpan span_du = new ImageSpan(dr_du, ImageSpan.ALIGN_BASELINE);
		du.setSpan(span_du, 11, 12, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
		text_dl.setText(du);

		TextView tvhd_at = (TextView) findViewById(R.id.tvhd_amthuc);
		tvhd_at.setText("3. Thông tin ẩm thực ở Đà Nẵng.");

		TextView text_at = (TextView) findViewById(R.id.text_amthuc);
		SpannableString at = new SpannableString(getText(R.string.amthuc));
		Drawable dr_at = getResources().getDrawable(R.drawable.hd_amthuc);
		dr_at.setBounds(0, 0, dr_at.getIntrinsicWidth(),
				dr_at.getIntrinsicHeight());
		ImageSpan span_at = new ImageSpan(dr_at, ImageSpan.ALIGN_BASELINE);
		at.setSpan(span_at, 11, 12, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
		text_at.setText(at);

		TextView tv_nhahang = (TextView) findViewById(R.id.text_nhahang);
		tv_nhahang.setText(getText(R.string.nhahang));

		TextView tv_giaikhat = (TextView) findViewById(R.id.text_giaikhat);
		tv_giaikhat.setText(getText(R.string.giaikhat));

		TextView tvhd_ms = (TextView) findViewById(R.id.tvhd_muasam);
		tvhd_ms.setText("4. Thông tin địa điểm mua sắm ở Đà Nẵng.");

		TextView text_ms = (TextView) findViewById(R.id.text_muasam);
		SpannableString ms = new SpannableString(getText(R.string.muasam));
		Drawable dr_ms = getResources().getDrawable(R.drawable.hd_shopping);
		dr_ms.setBounds(0, 0, dr_ms.getIntrinsicWidth(),
				dr_ms.getIntrinsicHeight());
		ImageSpan span_ms = new ImageSpan(dr_ms, ImageSpan.ALIGN_BASELINE);
		ms.setSpan(span_ms, 11, 12, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
		text_ms.setText(ms);

		TextView tv_sieuthi = (TextView) findViewById(R.id.text_sieuthi);
		tv_sieuthi.setText(getText(R.string.sieuthi));

		TextView tv_cho = (TextView) findViewById(R.id.text_cho);
		tv_cho.setText(getText(R.string.cho));

		TextView tv_cuahang = (TextView) findViewById(R.id.text_cuahang);
		tv_cuahang.setText(getText(R.string.cuahang));

		TextView tvhd_taxi = (TextView) findViewById(R.id.tvhd_taxi);
		tvhd_taxi.setText("5. Thông tin các hãng TAXI ở Đà Nẵng.");

		TextView text_tx = (TextView) findViewById(R.id.text_taxi);
		SpannableString tx = new SpannableString(getText(R.string.taxi));
		Drawable dr_tx = getResources().getDrawable(R.drawable.hd_taxi);
		dr_tx.setBounds(0, 0, dr_tx.getIntrinsicWidth(),
				dr_tx.getIntrinsicHeight());
		ImageSpan span_tx = new ImageSpan(dr_tx, ImageSpan.ALIGN_BASELINE);
		tx.setSpan(span_tx, 11, 12, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
		text_tx.setText(tx);

		TextView tvhd_atm = (TextView) findViewById(R.id.tvhd_atm);
		tvhd_atm.setText("6. Thông tin ATM ở Đà Nẵng.");

		TextView text_atm = (TextView) findViewById(R.id.text_atm);
		SpannableString atm = new SpannableString(getText(R.string.atm));
		Drawable dr_atm = getResources().getDrawable(R.drawable.hd_atm);
		dr_atm.setBounds(0, 0, dr_atm.getIntrinsicWidth(),
				dr_atm.getIntrinsicHeight());
		ImageSpan span_atm = new ImageSpan(dr_atm, ImageSpan.ALIGN_BASELINE);
		atm.setSpan(span_atm, 11, 12, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
		text_atm.setText(atm);

		TextView tvhd_face = (TextView) findViewById(R.id.tvhd_face);
		tvhd_face.setText("7. Chia sẽ lên facebook của bạn.");

		TextView text_face = (TextView) findViewById(R.id.text_face);
		SpannableString face = new SpannableString(getText(R.string.facebook));
		Drawable dr_face = getResources().getDrawable(R.drawable.hd_facebook);
		dr_face.setBounds(0, 0, dr_face.getIntrinsicWidth(),
				dr_face.getIntrinsicHeight());
		ImageSpan span_face = new ImageSpan(dr_face, ImageSpan.ALIGN_BASELINE);
		face.setSpan(span_face, 11, 12, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
		text_face.setText(face);

	}
}
